<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img class="banner-img" src="http://img1.qunarzz.com/sight/p0/1511/ea/eaf1bdc38aed9e6690.img.jpg_600x330_5597540f.jpg" />
      <div class="banner-info">
        <div class="banner-number">
          <span class="iconfont icon-pic">&#xe620;</span>18
        </div>
        <div class="banner-title">
          银杏湖乐园
        </div>
      </div>
    </div>
    <gallary :imgs="imgs" v-show="showGallary" @close="handleGallaryClose"></gallary>
  </div>
</template>

<script>
import Gallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  components: {
    Gallary
  },
  data () {
    return {
      'showGallary': false,
      imgs: [
        'http://img1.qunarzz.com/sight/p0/1604/23/234eeb58475668b990.water.jpg_r_800x800_b3505645.jpg',
        'http://img1.qunarzz.com/sight/p0/1604/d4/d4bc9acf1a03f40e90.water.jpg_r_800x800_1772ca85.jpg',
        'http://img1.qunarzz.com/sight/p0/1707/76/7675dc7a45dafd28a3.img.jpg_r_800x800_96657149.jpg'
      ]
    }
  },
  methods: {
    handleBannerClick () {
      this.showGallary = true
    },
    handleGallaryClose () {
      this.showGallary = false
    }
  }
}
</script>

<style lang="stylus" scoped>
  .banner
    overflow hidden
    height 0
    padding-bottom 55%
    position relative
    .banner-img
      width 100%
    .banner-info
      position absolute
      left .2rem
      bottom .1rem
      color #fff
      .banner-number
        width 1rem
        padding .02rem
        text-align center
        border-radius .2rem
        background-color rgba(0, 0, 0, .5)
        .icon-pic
          font-size .28rem
      .banner-title
        height .6rem
        line-height .6rem
        font-size .35rem
        display inline-block
</style>
